using System;

namespace TeamReview
{
	public class Project
	{
		private string _lastUserAssigned;
		private int _lastItemAssociated;
		private int _lastReviewReplayed;
		private Guid _lastQueryGuid;
		private Guid _lastReviewQuery;
		private string _projectUri;
		private string _name;
		public string _userName;

		public string UserName
		{
			[System.Diagnostics.DebuggerStepThrough]
			get { return _userName; }

			[System.Diagnostics.DebuggerStepThrough]
			set { _userName = value; }
		}

		public string Name {
			[System.Diagnostics.DebuggerStepThrough]
			get { return _name; }

			[System.Diagnostics.DebuggerStepThrough]
			set { _name = value; }
		}

		public Project(string projectUri, string name, string userName)
		{
			_projectUri = projectUri;
			_name = name;
			_userName = userName;
		}

		public Guid LastReviewQuery
		{
			[System.Diagnostics.DebuggerStepThrough]
			get { return _lastReviewQuery; }

			[System.Diagnostics.DebuggerStepThrough]
			set { _lastReviewQuery = value; }
		}

		public Guid LastQueryGuid
		{
			[System.Diagnostics.DebuggerStepThrough]
			get { return _lastQueryGuid; }

			[System.Diagnostics.DebuggerStepThrough]
			set { _lastQueryGuid = value; }
		}

		public int LastReviewReplayed
		{
			[System.Diagnostics.DebuggerStepThrough]
			get { return _lastReviewReplayed; }

			[System.Diagnostics.DebuggerStepThrough]
			set { _lastReviewReplayed = value; }
		}

		public int LastItemAssociated
		{
			[System.Diagnostics.DebuggerStepThrough]
			get { return _lastItemAssociated; }

			[System.Diagnostics.DebuggerStepThrough]
			set { _lastItemAssociated = value; }
		}

		public string LastUserAssigned
		{
			[System.Diagnostics.DebuggerStepThrough]
			get { return _lastUserAssigned; }

			[System.Diagnostics.DebuggerStepThrough]
			set { _lastUserAssigned = value; }
		}

		public string ProjectUri
		{
			[System.Diagnostics.DebuggerStepThrough]
			get { return _projectUri; }

			[System.Diagnostics.DebuggerStepThrough]
			set { _projectUri = value; }
		}


		public override bool Equals(object obj)
		{
			if (obj == null)
				return false;

			Project other = obj as Project;

			if(other == null)
				return false;

			return other.ProjectUri.Equals(ProjectUri);

		}
	}
}
